package com.zh.manage.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.zh.common.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;

/**
 * code is far away from bug with the animal protecting
 * ┏┓　　　┏┓
 * ┏┛┻━━━┛┻┓
 * ┃　　　　　　　┃
 * ┃　　　━　　　┃
 * ┃　┳┛　┗┳　┃
 * ┃　　　　　　　┃
 * ┃　　　┻　　　┃
 * ┃　　　　　　　┃
 * ┗━┓　　　┏━┛
 * 　　┃　　　┃神兽保佑
 * 　　┃　　　┃代码无BUG！
 * 　　┃　　　┗━━━┓
 * 　　┃　　　　　　　┣┓
 * 　　┃　　　　　　　┏┛
 * 　　┗┓┓┏━┳┓┏┛
 * 　　　┃┫┫　┃┫┫
 * 　　　┗┻┛　┗┻┛
 *
 * @Description: 地区维护实体类
 * @Author: Li.HuiNeng
 * @Create in: 2019/8/17
 * @Version: 1.0.1
 */
@TableName("system_area")
@ApiModel(description = "地区实体类")
@Data
@EqualsAndHashCode(callSuper = true)
public class AreaEntity extends Model<AreaEntity> {
    private static final long serialVersionUID = -5114792497567303657L;

    @ApiModelProperty(value = "主键", name = "id", required = true, example = "1")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    @ApiModelProperty(value = "逻辑删除字段", name = "deleted")
    @TableLogic
    private Integer deleted;
    @ApiModelProperty(value = "地区代码", name = "areaCode", example = "2210")
    @TableField(value = "area_code", condition = SqlCondition.LIKE)
    private String areaCode;

    @ApiModelProperty(value = "地区名称", name = "areaName", example = "沈阳市")
    @TableField(value = "area_name", condition = SqlCondition.LIKE)
    private String areaName;

    @ApiModelProperty(value = "地区级别 1-省级 2-地级 3-市级 4-县级市 5-县级", name = "areaLevel", example = "1")
    @TableField(value = "area_level", condition = SqlCondition.LIKE)
    private Integer areaLevel;

    @ApiModelProperty(value = "所属城市", name = "city", example = "沈阳市")
    @TableField(value = "city", condition = SqlCondition.LIKE)
    private String city;

    @ApiModelProperty(value = "所属省份", name = "province", example = "辽宁省")
    @TableField(value = "province", condition = SqlCondition.LIKE)
    private String province;

}
